﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Rss.aspx.vb" Inherits="project.Rss"  ContentType="text/xml"%>
<%@ Import Namespace = "System.Data" %>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
    SelectCommand="SELECT [ID], [Brands], [Name] FROM [wined]">
    </asp:SqlDataSource>

<asp:Repeater runat="server" DataSourceID="SqlDataSource1">

    <HeaderTemplate>
    <rss version="2.0">
      <channel>
        <title>List of winelovers</title>
        <description>===============Wines=================</description>
     </HeaderTemplate>
      <ItemTemplate>
      <item>  
               <link> descriptin.aspx?ID=<%# FormatForXML(DataBinder.Eval(Container.DataItem, "ID"))%></link>
              <title> <%# FormatForXML(DataBinder.Eval(Container.DataItem, "Brands"))%></title>
              <description>
                 Category:<%# FormatForXML(DataBinder.Eval(Container.DataItem, "Name"))%>
           
                </description>
            
            <Name> <%# FormatForXML(DataBinder.Eval(Container.DataItem, "Name"))%></Name>
       <hr />
        </item>
     
     </ItemTemplate>
     <FooterTemplate>
      </channel>
    </rss>  
  </FooterTemplate>
</asp:Repeater>


